﻿Public Class frmBrowserTree

    Public TreeCollapsed As Boolean = False

    Public Function ToggleTreeView()
        If TreeCollapsed Then
            With SplitContainer1
                .Panel1MinSize = 0
                .Panel2MinSize = 0
                .SplitterDistance = 0
            End With
            TreeCollapsed = False
        Else
            With SplitContainer1
                .Panel1MinSize = 25
                .Panel2MinSize = 25
                .SplitterDistance = .Width / 3
            End With
            TreeCollapsed = True
        End If
        ToggleTreeView = TreeCollapsed
    End Function
End Class